package org.bluedream.core.module.sys.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.IService;
import org.bluedream.comm.base.BaseServiceImpl;
import org.bluedream.comm.utils.EmptyUtil;
import org.bluedream.core.module.sys.dao.RoleRelationDao;
import org.bluedream.core.module.sys.entity.Menu;
import org.bluedream.core.module.sys.entity.RoleRelation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName RoleRelationService
 * @Description TODO
 * @Author foxsand
 * @Data 2021-07-01 14:35
 * @Version
 */
@Service
@DS("master")
//@Transactional(readOnly=true)
public class RoleRelationService extends BaseServiceImpl<RoleRelationDao, RoleRelation> implements IService<RoleRelation> {
    private static final Logger logger = LoggerFactory.getLogger(RoleRelationService.class);

    @Override
    public RoleRelation getById(Serializable id) {
        return EmptyUtil.isEmpty(id)?new RoleRelation():super.getById(id);
    }
}
